// Have include guard.
#ifndef FPK_TWOJOYSTICKVALUE_HPP
#define FPK_TWOJOYSTICKVALUE_HPP

// Include files.
#include "WPILib.h"
#include "JoystickValue.hpp"
#include "XboxJoystickValue.hpp"

/**
 *  The TwoJoystickValue struct stores only the x-axis and y-axis data of a left and right joystick by stored a JoystickValue of each joystick.
 */
struct TwoJoystickValue
{
	private:
		JoystickValue m_left;
		JoystickValue m_right;
	public:
		/**
		 *  Constructor for TwoJoystickValue.
		 *  
		 *  @param left The JoystickValue of the left joystick.
		 *  @param right The JoystickValue of the right joystick.
		 */
		inline TwoJoystickValue(const JoystickValue &left, const JoystickValue &right) :
			m_left(left),
			m_right(right)
		{
		}
		
		/**
		 *  Constructor for TwoJoystickValue.
		 *  
		 *  @param leftJoystick The joystick from which to obtain the left JoystickValue.
		 *  @param rightJoystick The joystick from which to obtain the right JoystickValue.
		 */
		inline TwoJoystickValue(GenericHID &leftJoystick, GenericHID &rightJoystick) :
			m_left(leftJoystick),
			m_right(rightJoystick)
		{
		}
		
		/**
		 *  Constructor for TwoJoystickValue.
		 *  
		 *  @param value The XboxJoystickValue to convert from.
		 */
		inline TwoJoystickValue(const XboxJoystickValue &value) :
			m_left(value.GetLeftValue()),
			m_right(value.GetLeftValue())
		{
		}
		
		/**
		 *  Get the stored left JoystickValue.
		 *  
		 *  @return The stored left JoystickValue.
		 */
		inline const JoystickValue &GetLeftValue() const
		{
			return m_left;
		}
		
		/**
		 *  Get the stored right JoystickValue.
		 *  
		 *  @return The stored right JoystickValue.
		 */
		inline const JoystickValue &GetRightValue() const
		{
			return m_right;
		}
};

#endif // #ifndef FPK_TWOJOYSTICKVALUE_HPP
